﻿@using Resources;
@model sipfe.model.dataAccess.SIPMaeConvocatoria
<script type="text/javascript" src="@Url.Content(@properties.nuevoJS)" ></script>
<script type="text/javascript">
    $(function () {
        setAutoAyudaEmpresa("#nIdeEmpresa", "#nIdeCodPaisDoc", "#nIdeTipoDocum", "#vNumDocum", "#vNombres", "/AutoAyuda/ListaEmpresaAuto", "1");
        setAutoAyudaEmpresa("#nIdeEmpresa", "#nIdeCodPaisDoc", "#nIdeTipoDocum", "#vNombres", "#vNumDocum", "/AutoAyuda/ListaEmpresaAuto", "2");
        inicioPopPupModal("#divTarifario", 500, 950, "REGISTROS ENCONTRADOS EN EL TARIFARIO");
        calendarioFuturo1('dFecIniVig', '0');
        calendarioFuturo1('dFecFinVig', '0');
    });
</script>
@using (Html.BeginForm("AddNuevaConvocatoria", "Convocatoria", FormMethod.Post))
{   
    <br />
    <fieldset style="width:900px;">
        <legend><span>Datos Generales de la Convocatoria</span></legend>
         <table border="0">
            <tr>
                <td>Clase de Solicitud<span class="asterisco">(*)</span></td>
                <td>Tipo Convocatoria<span class="asterisco">(*)</span></td>
                <td>Inicio de Vigencia<span class="asterisco">(*)</span></td>
                <td>Fin de Vigencia</td> 
                <td>Número RUC<span class="asterisco">(*)</span></td>
                <td>Razón Social de la Empresa Financiadora / Gestionadora<span class="asterisco">(*)</span></td>
            </tr>
             <tr>
                <td>@Html.DropDownList("nIdeClaseSol", (IEnumerable<SelectListItem>)ViewBag.Clase_Tramite)</td>
                <td>@Html.DropDownList("nIdeTipoConvo", (IEnumerable<SelectListItem>)ViewBag.TipoConvocatoria, "--Seleccione--")</td>
                <td>@Html.TextBox("dFecIniVig", null, new { style = "width:60px;", maxlength = 10, onkeyup="javascript:setFechaCaja(this);", onkeypress = "return validarCharFecha(event);", onblur="javascript:ValDateTextNew(this);" }) </td>
                <td>@Html.TextBox("dFecFinVig", null, new { style = "width:60px;", maxlength = 10, onkeyup="javascript:setFechaCaja(this);", onkeypress = "return validarCharFecha(event);", onblur="javascript:ValDateTextNew(this);" })</td>
                <td>@Html.TextBox("vNumDocum", null, new { style = "width:100px;", maxlength = 20 })</td>
                <td>@Html.HiddenFor(model => model.nIdeEmpresa) @Html.TextBox("vNombres", null, new { style = "width:300px;", maxlength = 50, onkeypress = "return validaAlfaNumTamanio(this, event, 50);" })</td> 
             </tr>
         </table>
        <br />
        <table border="0">
            <tr>
                <td>Descripción<span class="asterisco">(*)</span></td>
                <td>:</td>
                <td>@Html.TextArea("vDescr", null, new { style = "width:790px;height:25px;", onblur = "javascript:onBlurUpper(this);", maxlength = 450, ondblclick = "javascript:cleanBox(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 450);" })</td>
            </tr>
        </table>
        <br />
        <table border="0">
            <tr>
                <td>Moneda<span class="asterisco">(*)</span></td>
                <td>Monto Bruto Beca<span class="asterisco">(*)</span></td>
                <td>% Para IPFE<span class="asterisco">(*)</span></td>
                <td>% Para Beca<span class="asterisco">(*)</span></td> 
                <td>Monto Neto IPFE<span class="asterisco">(*)</span></td>
                <td>Monto Neto Beca<span class="asterisco">(*)</span></td>
                <td>% o Monto Para Empleados<span class="asterisco">(*)</span></td>
                <td>% o Monto Para Operarios<span class="asterisco">(*)</span></td> 
            </tr>
             <tr class="center">
                <td>@Html.DropDownList("nIdeTipoMoneda", (IEnumerable<SelectListItem>)ViewBag.TipoMoneda, "--Seleccione--")</td>
                <td>@Html.TextBox("nMontoBrutoConvo", null, new { style = "width:70px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea1();"  })</td>
                <td>@Html.TextBox("nPorcParaIpfe", null, new { style = "width:30px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea1();" })</td>
                <td>@Html.TextBox("nPorcParaBeca", null, new { style = "width:30px;background-color:#cccccc;", maxlength = 20, readOnly=true })</td>
                <td>@Html.TextBox("nMontoNetoIpfe", null, new { style = "width:70px;background-color:#cccccc;", maxlength = 20, readOnly=true })</td>
                <td>@Html.TextBox("nMontoNetoConvo", null, new { style = "width:70px;background-color:#cccccc;", maxlength = 20, readOnly=true})</td>
                <td>
                    <select id="nIdeTipoMonto" name="nIdeTipoMonto" onchange="javascript:limpiaMontoPorcentajeBeca(this);">
                        <option value="">--Seleccione--</option>
                        <option value="1">Prcentaje</option>
                        <option value="2">Monto</option>
                    </select>
                    @Html.TextBox("nPorcParaEmpleado", null, new { style = "width:70px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea1();" })</td>
                <td>@Html.TextBox("nPorcParaOperario", null, new { style = "width:70px;background-color:#cccccc;", maxlength = 20, readOnly=true})</td>
             </tr>
         </table>
        <hr />
        <table border="0" style="width:750px;">
            <tr>
                <td>Monto Beca Para Empleado<span class="asterisco">(*)</span>@Html.TextBox("nMontoBecaEmple", null, new { style = "width:70px;background-color:#cccccc;", maxlength = 20, readOnly=true })</td>
                <td>Nivel</td>
                <td>% Para Beca<span class="asterisco">(*)</span></td>
                <td>Monto de Beca<span class="asterisco">(*)</span></td>
                <td>Número de Becas<span class="asterisco">(*)</span></td>
                <td>Monto a Otorgar X Beca<span class="asterisco">(*)</span></td> 
            </tr>
             <tr>
                 <td>&nbsp;</td>
                 <td>PRIMARIA</td>
                 <td>@Html.TextBox("nPorcPrimariaEmple", null, new { style = "width:60px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea2and3(this,'Emple');" })</td>
                 <td>@Html.TextBox("nMontoPrimariaEmple", null, new { style = "width:60px;background-color:#cccccc;", maxlength = 20, readOnly=true })</td>
                 <td>@Html.TextBox("nNumBecasPrimariaEmple", null, new { style = "width:60px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea2and3(this,'Emple');" })</td>
                 <td>@Html.TextBox("nMontoXBecaPrimariaEmple", null, new { style = "width:60px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea2and3(this,'Emple');" })</td>
             </tr>
             <tr>
                <td>&nbsp;</td>
                <td>SECUNDARIA</td>                
                <td>@Html.TextBox("nPorcSecundariaEmple", null, new { style = "width:60px;", maxlength = 20 , onblur = "javascript:recalculaMontoLinea2and3(this,'Emple');"})</td>
                <td>@Html.TextBox("nMontoSecundariaEmple", null, new { style = "width:60px;background-color:#cccccc;", maxlength = 20, readOnly=true })</td>
                <td>@Html.TextBox("nNumBecasSecundariaEmple", null, new { style = "width:60px;", maxlength = 20 , onblur = "javascript:recalculaMontoLinea2and3(this,'Emple');"})</td>
                <td>@Html.TextBox("nMontoXBecaSecundariaEmple", null, new { style = "width:60px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea2and3(this,'Emple');" })</td>
             </tr>
             <tr>
                <td>&nbsp;</td>
                <td>TÉCNICA</td>
                <td>@Html.TextBox("nPorcTecnicaEmple", null, new { style = "width:60px;", maxlength = 20 , onblur = "javascript:recalculaMontoLinea2and3(this,'Emple');" })</td>
                <td>@Html.TextBox("nMontoTecnicaEmple", null, new { style = "width:60px;background-color:#cccccc;", maxlength = 20, readOnly=true })</td>
                <td>@Html.TextBox("nNumBecasTecnicaEmple", null, new { style = "width:60px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea2and3(this,'Emple');" })</td>
                <td>@Html.TextBox("nMontoXBecaTecnicaEmple", null, new { style = "width:60px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea2and3(this,'Emple');" })</td>
             </tr>
            <tr>
                <td>&nbsp;</td>
                <td>UNIVERSITARIA</td>
                <td>@Html.TextBox("nPorcUniEmple", null, new { style = "width:60px;", maxlength = 20 , onblur = "javascript:recalculaMontoLinea2and3(this,'Emple');" })</td>
                <td>@Html.TextBox("nMontoUniEmple", null, new { style = "width:60px;background-color:#cccccc;", maxlength = 20, readOnly=true })</td>
                <td>@Html.TextBox("nNumBecasUniEmple", null, new { style = "width:60px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea2and3(this,'Emple');" })</td>
                <td>@Html.TextBox("nMontoXBecaUniEmple", null, new { style = "width:60px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea2and3(this,'Emple');" })</td>
             </tr>
         </table>
        <hr />
        <table border="0" style="width:750px;">
            <tr>
                <td>Monto Beca Para Operario<span class="asterisco">(*)</span>@Html.TextBox("nMontoBecaOpera", null, new { style = "width:70px;background-color:#cccccc;", maxlength = 20, readOnly=true })</td>
                <td>Nivel</td>
                <td>% Para Beca<span class="asterisco">(*)</span></td>
                <td>Monto de Beca<span class="asterisco">(*)</span></td>
                <td>Número de Becas<span class="asterisco">(*)</span></td>
                <td>Monto a Otorgar X Beca<span class="asterisco">(*)</span></td> 
            </tr>
             <tr>
                 <td>&nbsp;</td>
                 <td>PRIMARIA</td>
                 <td>@Html.TextBox("nPorcPrimariaOpera", null, new { style = "width:60px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea2and3(this,'Opera');" })</td>
                 <td>@Html.TextBox("nMontoPrimariaOpera", null, new { style = "width:60px;background-color:#cccccc;", maxlength = 20, readOnly=true })</td>
                 <td>@Html.TextBox("nNumBecasPrimariaOpera", null, new { style = "width:60px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea2and3(this,'Opera');" })</td>
                 <td>@Html.TextBox("nMontoXBecaPrimariaOpera", null, new { style = "width:60px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea2and3(this,'Opera');" })</td>
             </tr>
             <tr>
                <td>&nbsp;</td>
                <td>SECUNDARIA</td>                
                <td>@Html.TextBox("nPorcSecundariaOpera", null, new { style = "width:60px;", maxlength = 20 , onblur = "javascript:recalculaMontoLinea2and3(this,'Opera');"})</td>
                <td>@Html.TextBox("nMontoSecundariaOpera", null, new { style = "width:60px;background-color:#cccccc;", maxlength = 20, readOnly=true })</td>
                <td>@Html.TextBox("nNumBecasSecundariaOpera", null, new { style = "width:60px;", maxlength = 20 , onblur = "javascript:recalculaMontoLinea2and3(this,'Opera');"})</td>
                <td>@Html.TextBox("nMontoXBecaSecundariaOpera", null, new { style = "width:60px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea2and3(this,'Opera');" })</td>
             </tr>
             <tr>
                <td>&nbsp;</td>
                <td>TÉCNICA</td>
                <td>@Html.TextBox("nPorcTecnicaOpera", null, new { style = "width:60px;", maxlength = 20 , onblur = "javascript:recalculaMontoLinea2and3(this,'Opera');" })</td>
                <td>@Html.TextBox("nMontoTecnicaOpera", null, new { style = "width:60px;background-color:#cccccc;", maxlength = 20, readOnly=true })</td>
                <td>@Html.TextBox("nNumBecasTecnicaOpera", null, new { style = "width:60px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea2and3(this,'Opera');" })</td>
                <td>@Html.TextBox("nMontoXBecaTecnicaOpera", null, new { style = "width:60px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea2and3(this,'Opera');" })</td>
             </tr>
            <tr>
                <td>&nbsp;</td>
                <td>UNIVERSITARIA</td>
                <td>@Html.TextBox("nPorcUniOpera", null, new { style = "width:60px;", maxlength = 20 , onblur = "javascript:recalculaMontoLinea2and3(this,'Opera');" })</td>
                <td>@Html.TextBox("nMontoUniOpera", null, new { style = "width:60px;background-color:#cccccc;", maxlength = 20, readOnly=true })</td>
                <td>@Html.TextBox("nNumBecasUniOpera", null, new { style = "width:60px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea2and3(this,'Opera');" })</td>
                <td>@Html.TextBox("nMontoXBecaUniOpera", null, new { style = "width:60px;", maxlength = 20, onblur = "javascript:recalculaMontoLinea2and3(this,'Opera');" })</td>
             </tr>
         </table>
        <hr />
        <table>
        <tr>
            <td style="height:30px;width:400px;">Campo Obligatorio:<span class="asterisco">(*)</span></td>
            <td><input type="button" value="Registrar" onclick="javascript: addNuevaConvocatoriaPabe(this, this.form);" /></td>
        </tr>
    </table>
    </fieldset>
     @Html.HiddenFor(model => model.nIdeUsuReg, new { Value = @Session["nIdeUsuario"] })
    <div id="divTarifario"></div>
}